package com.roxtv.CheckIfPalindrome;

import java.util.Scanner;

public class Main {

	private static String input;
	private static String output;
	private static Scanner scan = new Scanner(System.in);
	private static char[] inputChar;
	private static char[] outputChar;
	
	public static void main(String[] args){
		System.out.println("Give me a word and I will tell you if it is a palindrome ");
		input = scan.next();
		inputChar = input.toCharArray();
		outputChar = new char[inputChar.length];
		for(int i = 0; i < inputChar.length;i++){
			outputChar[inputChar.length - (i+1)] = inputChar[i];
		}
		output = String.valueOf(outputChar);
		if(input.equals(output)){
			System.out.println("The word " + input + " is a palindrome");
		}else{
			System.out.println("The word " + input + " is not a palindrome");
		}
	}
	
}
